#ifndef _TEXTURE_CONTAINER_H_
#define _TEXTURE_CONTAINER_H_


#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000


#include "Error.h"
#include <map>
#include <string>
#include "..\Exceptions\notImageExcep.h"
#include "..\Exceptions\TextureNotFoundException.h"
#include "..\Exceptions\msjExcep.h"
#include "..\Texture\Texture.h"
#include "..\Exceptions\IdAlreadyExistsException.h"

class Figure;

class TextureContainer {
	
	public:
	
		virtual ~TextureContainer();

		static TextureContainer* getInstance();

		Texture* getTextureById(std::string textureId) throw (TextureNotFoundException);

		void addTexture(Texture* figure);

		const std::map<std::string, Texture*> getAllTextures() const;
	
		static bool existTexture(Texture* texture);

		static void destroy();

	private:

		TextureContainer();
	
		static TextureContainer* instance;

		static std::map<std::string,Texture*> textures;

};

#endif
